package com.xbongbong.workflow.model;

import com.xbongbong.workflow.domain.entity.WorkflowTransferDataEntity;

import java.util.List;
import java.util.Map;


/**
 */
public interface WorkflowTransferDataModel {
   Long insert(WorkflowTransferDataEntity entity);

   void insertBatch(List<WorkflowTransferDataEntity> list);

   List<WorkflowTransferDataEntity> findEntities(Map<String, Object> param);

   Integer getEntityCount(Map<String, Object> param);

   void update(WorkflowTransferDataEntity entity);

   WorkflowTransferDataEntity getByKey(Long key, String corpid);

   WorkflowTransferDataEntity getByTaskId(Long taskId, String corpid);

    void deleteByTaskId(Long taskId, String corpid);

    void deleteByTaskIds(String corpid, List<Long> taskIds);

    /**
     * 审批中数据
     * @param param
     * @return
     */
    List<WorkflowTransferDataEntity> hasDataInApprovalWithData(Map<String, Object> param);

    /**
     * 只更新data
     * @param list
     * @param corpid
     * @return
     */
    Integer updateDataBatch(List<WorkflowTransferDataEntity> list, String corpid);
}
